import { IsString, IsNotEmpty, Length, IsDateString, IsEnum } from 'class-validator';

// 定义心情枚举
enum Mood {
    HAPPY = '开心',
    NORMAL = '一般',
    SAD = '难过',
    EXCITED = '兴奋',
    TIRED = '疲惫'
}

// 定义天气枚举
enum Weather {
    SUNNY = '晴天',
    CLOUDY = '多云',
    RAINY = '下雨',
    SNOWY = '下雪',
    WINDY = '刮风'
}

export class CreateCalendarDto {
    @IsDateString()
    @IsNotEmpty()
    date: string;

    @IsEnum(Mood)
    @IsNotEmpty()
    mood: Mood;    // 心情

    @IsEnum(Weather)
    @IsNotEmpty()
    weather: Weather;  // 天气

    @IsString()
    @IsNotEmpty()
    @Length(1, 1000)
    content: string;   // 内容

    @IsString()
    @Length(0, 200)
    remark?: string;   // 备注，可选
}